<?php

namespace Store\Model;

//use Zend\InputFilter\Factory as InputFactory;
//use Zend\InputFilter\InputFilter;
//use Zend\InputFilter\InputFilterAwareInterface;
//use Zend\InputFilter\InputFilterInterface;

class Store_products //implements InputFilterAwareInterface
{
	public $id;
	public $name;
	public $desc;
	public $cost;
	
	
	
	function exchangeArray($data)
	{
		$this->id = (isset($data['id'])) ? $data['id'] : null;
		$this->name = (isset($data['name'])) ?	$data['name'] : null;
		$this->desc = (isset($data['desc'])) ? $data['desc'] : null;
		$this->cost = (isset($data['cost'])) ? $data['cost'] : null;
	}

	/*public function setInputFilter(InputFilterInterface $inputFilter)
	{
		throw new \Exception("Not used");
	}
	
	public function getInputFilter()
	{
		if (!$this->inputFilter) {
			$inputFilter = new InputFilter();
			$factory     = new InputFactory();
	
			$inputFilter->add(
					$factory->createInput(array(
							'name'     => 'profilename',
							'required' => true,
							'filters'  => array(
									array('name' => 'StripTags'),
									array('name' => 'StringTrim'),
							),
							'validators' => array(
									array(
											'name'    => 'StringLength',
											'options' => array(
													'encoding' => 'UTF-8',
													'min'      => 1,
													'max'      => 100,
											),
									),
							),
					))
			);
			 
			$inputFilter->add(
					$factory->createInput(array(
							'name'     => 'fileupload',
							'required' => true,
					))
			);
			 
			$this->inputFilter = $inputFilter;
		}
		 
		return $this->inputFilter;
	}*/
	public function getArrayCopy()
	{
		return get_object_vars($this);
	}
}

?>
